﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Forum.Entity.Board;
using Frame.Lib.Core.Base;

namespace Forum.DAL.Board
{
    public class BoardDAL : BaseDAL
    {
        public List<BoardInfo> GetList()
        {
            string sql = "select *,(select count(*) from " + TableName.Post + " where BoardID = ForumBoard.ID and datediff(d,InputTime,getdate()) = 0) as TodayPosts from " + TableName.Board;
            List<BoardInfo> list = dbOper.Query<BoardInfo>(sql);
            return list;
        }
    }
}
